package com.example.isak.myasd.service;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.isak.myasd.dao.InfoDao;
import com.example.isak.myasd.domin.InfoDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.stereotype.Service;

/**
 * 
 * 
 * @author isak
 * @email 1503386669@qq.com
 * @date 2020-10-16 15:34:34
 */
 @Service
public class InfoService {

    @Autowired
    private InfoDao infoDao;
    
    public InfoDO get(String id){
        return infoDao.get(id);
    }
    
    public Page<InfoDO> page(Page<InfoDO> page, Map<String, Object> map){
        return infoDao.list(page, map);
    }
    
    public List<InfoDO> list(Map<String, Object> map){
        return infoDao.list(map);
    }
    
    @Transactional(readOnly=false)
    public int save(InfoDO info){
        return infoDao.save(info);
    }
    
    @Transactional(readOnly=false)
    public int remove(String id){
        return infoDao.remove(id);
    }
    
    @Transactional(readOnly=false)
    public int batchRemove(String[] ids){
        return infoDao.batchRemove(ids);
    }
    
}
